home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / CPP / WFC010.ZIP / INCLUDE / OVRLPD.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-07  |  1.4 KB  |  59 lines

  1. #if ! defined( OVERLAPPED_CLASS_HEADER )
  2.  
  3. /*
  4. ** Author: Samuel R. Blackburn
  5. ** CI$: 76300,326
  6. ** Internet: sammy@sed.csc.com
  7. **
  8. ** You can use it any way you like as long as you don't try to sell it.
  9. **
  10. ** Any attempt to sell WFC in source code form must have the permission
  11. ** of the original author. You can produce commercial executables with
  12. ** WFC but you can't sell WFC.
  13. **
  14. ** Copyright, 1995, Samuel R. Blackburn
  15. **
  16. ** $Workfile: $
  17. ** $Revision: $
  18. ** $Modtime: $
  19. */
  20.  
  21. #define OVERLAPPED_CLASS_HEADER
  22.  
  23. class COverlapped
  24. {
  25.    protected:
  26.  
  27.       OVERLAPPED m_Overlapped;
  28.  
  29.    public:
  30.  
  31.       COverlapped();
  32.       COverlapped( const OVERLAPPED * source );
  33.  
  34.       /*
  35.       ** Destructor should be virtual according to MSJ article in Sept 1992
  36.       ** "Do More with Less Code:..."
  37.       */
  38.  
  39.       virtual ~COverlapped();
  40.  
  41.       /*
  42.       ** Methods
  43.       */
  44.  
  45.       inline HANDLE GetEvent( void )                { return( m_Overlapped.hEvent ); }
  46.       inline DWORD  GetOffset( void )               { return( m_Overlapped.Offset ); }
  47.       inline void   IncrementOffset( DWORD amount ) { m_Overlapped.Offset += amount; }
  48.       inline void   SetEvent( HANDLE event_handle );
  49.       inline void   SetOffset( DWORD new_offset )   { m_Overlapped.Offset = new_offset; }
  50.  
  51.       /*
  52.       ** Operators
  53.       */
  54.  
  55.       inline operator OVERLAPPED *() { return( &m_Overlapped ); }
  56. };
  57.  
  58. #endif // OVERLAPPED_CLASS_HEADER
  59.